mui.ready(function() {
	document.getElementById("reg").addEventListener("tap", function() {
		var paypassword = document.querySelector(".paypassword").value;
		var memo = document.querySelector(".memo").value;
		var toUserName = document.querySelector(".toUserName").value;
		var money = document.querySelector(".money").value;

		mui.ajax("/api/v1/finance/transfer/balance", {
			data: {
				paramStr: "{userName:" + sessionStorage.userName + ",token:" + sessionStorage.token + ",paypassword:" + paypassword + ",money:" + money + ",memo:'" + memo + "',toUserName:" + toUserName + "}"
			},
			dataType: 'json',
			type: 'post',
			success: function(data) {
				document.querySelector(".note").style.display = "block";
				document.querySelector(".note").innerHTML = data.message;
				if (data.code == 200) {
					setTimeout(function() {
						document.querySelector(".note").style.display = "none";
						mui.openWindow({
							url: '../index.html',
						});
					}, 3000)
				}
			},
			error: function(xhr, type, errorThrown) {
				//异常处理；
				alert("未知错误");
			}
		});
	});
})